<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!-- 添加商品 -->
<div class="cnt_Info" style="position:relative;">
	<h3 class="manageTitle">添加商品</h3>
    <form method="POST" enctype="multipart/form-data" id="productImageForm">
		<ul class="mode_add">
			<li>
		        <label>商品名称：</label>
                <input type="hidden" id="productId"/>
		        <input type="text" id="productName" class="input_txt" style="width:200px;" maxlength="20"/>
		    </li>
			<li>
			    <label>优惠价格：</label>
			    <input type="text" id="discountPrice" class="input_txt" maxlength="8"/>
			</li>
			<li>
			    <label>定&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价：</label>
			    <input type="text" id="originalPrice" class="input_txt" maxlength="8"/>
			</li>
			<li>
			    <label>分&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;类：</label>
			    <select id="type">
                    <option value="0">分类选择</option>
                    <option value="30">书籍</option>
                    <option value="31">CD-流行</option>
                    <option value="32">CD-爵士</option>
                    <option value="33">CD-民俗</option>
			    </select>
			</li>
			<li>
			    <label>热&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;门：</label>
			    <input type="radio" name="hot" value="0" checked="checked"/> 不是&nbsp;&nbsp;&nbsp;&nbsp;
			    <input type="radio" name="hot" value="1"/> 是
			</li>
			<li>
			    <label>库&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;存：</label>
			    <input type="text" id="stock" class="input_txt" maxlength="8"/>
			</li>
			<li>
			    <label>作&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;者：</label>
			    <input type="text" id="author" class="input_txt" maxlength="8"/>
			</li>
			<li>
			    <label>出&nbsp;版&nbsp;社：</label>
			    <input type="text" id="publishingCompany" class="input_txt" maxlength="20"/>
			</li>
			<li>
			    <label>出版时间：</label>
			    <input type="text" id="publishingDate" class="input_txt" readonly="readonly" onclick="javascript:WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
			</li>
			<li>
			    <label>商品相片：</label>
                <input type="hidden" id="imagePath"/>
                <input type="hidden" name="filePath" value="file/productPicture"/>
                <input type="hidden" name="width" value="143"/>
                <input type="hidden" name="height" value="193"/>
			    <input type="file" name="file" onchange="javascript:$('#productImageForm').submit();"/>
			</li>
			<li style="padding-left:85px;">
			           图片大小为198*143
			</li>
		</ul>
	    <div style="padding-left:125px;">
	        <input type="button" value="保存" class="greenBtn" onclick="javascript:merchant.addProduct('create');"/>&nbsp;&nbsp;
	        <input type="button" value="取消" class="grayBtn" onclick="javascript:$('#imagePath').val('');$('#productImageForm').resetForm();"/>
	    </div>
	    <div class="picDetail" style="position:absolute;left:300px; top:140px;">
	        <img src="" id="productImagePreview"/>
	    </div>
    </form>
</div>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/upload.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
	    upload.uploadImage('product');
	});
</script>
